package cn.yikaojiuguo.student.bean;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

import cn.yikaojiuguo.student.ui.ask.AskDetailActivity;

/**
 * Created by cfan_yang on 2016/1/25.
 */
public class Ask implements Serializable {

    private static final long serialVersionUID = 4856505357680230052L;
    private int mType = -1;
    private final static int FIRST_ASK = 1;

    public Ask(int type) {
        this.mType = type;
    }

    @SerializedName("audiotime")
    public String audiotime;

    @SerializedName("content")
    public String content;

    @SerializedName("etype")
    public String etype;

    @SerializedName("id")
    public String id;

    @SerializedName("issolve")
    public String issolve;

    @SerializedName("member")
    public Member member;

    @SerializedName("picture")
    public List<Picture> pictures;

    @SerializedName("pubdate")
    public String pubdate;

    @SerializedName("video")
    public String video;

    public int getType() {
        if ("1".equals(this.etype)) {
            return AskDetailActivity.AskDetailAdapter.TYPE_IMAGS;
        }
        if ("2".equals(this.etype)) {
            return AskDetailActivity.AskDetailAdapter.TYPE_VOICE;
        }
        if ("3".equals(this.etype)) {
            return AskDetailActivity.AskDetailAdapter.TYPE_WORD;
        }
        return mType;
    }

}
